package com.demo.aop;

import javax.annotation.Resource;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;

@Service
@Aspect
public class TestAop {
	
	@Pointcut("bean(SCargo)")
	public void aspectTest(){
	}
	
	@Before("aspectTest()")
	public void before(){
		System.out.println("-----before-----");
	}
	
	@After("aspectTest()")
	public void after(){
		System.out.println("-----after-----");
	}
}
